﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        if (!!keyValue) {
            $.ajax({
                url: "/WorkFlowSetting/Comment/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/WorkFlowSetting/Comment/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }

    function btn_selectuser() {
        $.modalOpen({
            id: "SelectUser",
            title: "选择用户",
            url: "/WorkFlowSetting/UserButton/SelectUser?moduleId=" + keyValue,
            width: "600px",
            height: "600px",
            callBack: function (iframeId) {
                top.frames[iframeId].submitForm();
            }
        });
    }


    function setMemberID(value) {
        $("#F_MemberID").val(value);
    }
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    意见
                </th>
                <td class="formValue">
                    <textarea id="F_Comment" name="F_Comment" class="form-control required" style="height: 60px;" placeholder="请录入意见"></textarea>
                </td>
            </tr>
            <tr>
                <th class="formTitle">使用成员</th>
                <td class="formValue">
                    <div class="input-group">
                        <input id="F_MemberID" name="F_MemberID" type="text" class="form-control" placeholder="请录入使用成员" /> 
                        <span class="input-group-btn" onclick="btn_selectuser()">
                            <a class="btn btn-primary" href="javascript:void(0);"><i class="fa fa-ellipsis-h"></i></a> // 为空表示所有成员
                        </span>
                    </div>
                </td>
            </tr>
            @*<tr>
                <th class="formTitle">意见类型</th>
                <td class="formValue">
                    <input id="F_Type" name="F_Type" type="text" class="form-control required" placeholder="请录入意见类型" />
                </td>
            </tr>*@
            <tr>
                <th class="formTitle">序号</th>
                <td class="formValue">
                    <input id="F_Sort" name="F_Sort" type="text" class="form-control required" placeholder="请录入序号" style="width:30%;"  />
                </td>
            </tr>
        </table>
    </div>
</form>


